package cn.wolfcode.wolf2w.strategy.service;


import cn.wolfcode.wolf2w.common.core.domain.R;
import cn.wolfcode.wolf2w.strategy.entity.Strategy;
import cn.wolfcode.wolf2w.strategy.entity.StrategyCondition;
import cn.wolfcode.wolf2w.strategy.entity.StrategyContent;
import cn.wolfcode.wolf2w.strategy.query.StrategyQuery;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 攻略Service接口
 * 
 * @author libai
 * @date 2024-07-24
 */
public interface IStrategyService extends IService<Strategy> {
    /**
    * 分页
    * @param qo
    * @return
    */
    IPage<Strategy> queryPage(StrategyQuery qo);

    List<Strategy> queryViewTop3ByDestId(Long destId);


    StrategyContent getContent(Long id);

    boolean strategySave(Strategy strategy);

    Strategy queryDetailById(Long id);

    Map<String, Object> viewnumIncr(Long sid);

    void statisHashDataPersistence();

    void statisHashInit();

    Map<String, Object> favor(Long sid, Long uid);

    boolean isUserFavor(Long sid, Long uid);

    Map<String,Object> incrCommentCount(Long strategyId);

    Map<String, Object> thumbsup(Long sid, Long uid);
}
